package com.ywt.tools;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;

public class GetData {

	private final static String SERVER_URL = "http://202.194.119.66:801/Service.asmx";
	private final static String nameSpace = "http://tempuri.org/";// 命名空间
//	static SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER11);
//	static String tempCode = "c9a290eb-448c-4559-ab2e-f66594320481";
	 
	public static void main(String[] args) {
//		test1();
		testLogin();
//		testLogout();
//		testUserRegister();
//		testChangeUserInfo();
//		testChangePasswd();
		testGetAreaCode();
		testGetChannel();
//		test9Publish();
//		test10();
//		test11();
//		test12();
//		test13();
//		test14();
//		test15();
//		test16();
//		test17();
//		test18();
//		test19();
	}

	private static void test19() {
		try {// 测试通过，但是需要提供where 格式
			// System.out.println("19>>新闻信息>>>>" + GetNewsList(tempCode,
			// "2013-09-03", "2013-10-09", 0, 0, "where"));
	} catch (Exception e) {
		System.out.println("19>>新闻信息获取异常>>>>" + e.getMessage());
	}
	
		
	}

	private static void test18() {
		try {// 测试通过
			// System.out.println("18>>新闻类型>>>>" + GetNewsType(tempCode));
		} catch (Exception e) {
			System.out.println("18>>新闻类型异常信息>>>>" + e.getMessage());
		}
	
	}

	private static void test17() {
		try {// 测试通过
//			 System.out.println("17>>获取通知>>>>" + GetNoticeList(tempCode, "2013-10-11"));
		} catch (Exception e) {
			System.out.println("17>>通知接口异常信息>>>>" + e.getMessage());
		}
	
		
	}

	private static void test16() {
		try {// 测试通过
//			 System.out.println("16>>产品订购>>>>" + GetSubscriptionList(tempCode));
		} catch (Exception e) {
			System.out.println("16>>产品订购异常信息>>>>" + e.getMessage());
		}

		
	}

	private static void test15() {
		try {
//			 System.out.println("15>>获取产品>>>>" + getProductlist(tempCode,  "17"));
		} catch (Exception e) {
			System.out.println("15>>获取产品异常信息>>>>" + e.getMessage());
		}
	
		
	}

	private static void test14() {
		try {
			// System.out.println("14>>提交建议>>>>" + SubmitSuggest("AccessCode",
			// "InforID"));
		} catch (Exception e) {
			System.out.println("14>>提交建议异常信息>>>>" + e.getMessage());
		}
		
		
	}

	private static void test13() {
		try {
			// System.out.println("13>>焦点信息>>>>" + GetInfoFocusList("InforID"));
		} catch (Exception e) {
			System.out.println("13>>焦点信息获取异常信息>>>>" + e.getMessage());
		}
		
		
	}

	private static void test12() {
		try {
			// System.out.println("12>>提交用户>>>>" + SubmitUsers("AccessCode",
			// "InforID"));
		} catch (Exception e) {
			System.out.println("12>>提交用户异常信息>>>>" + e.getMessage());
		}
	
	}

	private static void test11() {
		try {
			// System.out.println("11>>历史查询>>>>" +
			// GetInfoHistoryList("AccessCode", "startTime", "endTime", 0, 0,
			// "where"));
		} catch (Exception e) {
			System.out.println("11>>历时查询异常信息>>>>" + e.getMessage());
		}

	
		
	}

	private static void test10() {
		try {
			// System.out.println("10>>即时查询>>>>" + GetInfoList("AccessCode",
			// "20131009", "endTime", 0, 0,"where"));
		} catch (Exception e) {
			System.out.println("10>>即时查询异常信息>>>>" + e.getMessage());
		}
	
		
	}

	private static void test9Publish() {
try { 
			
			String Suggest_ID = "";
			String User_ID = "2";
			String Suggest_Content = "15812345678";
			String Suggest_Reply = "";
			String Reply_Email = "123456@qq.com";
			String Operator_ID = " ";
			String Suggest_Type = " ";
			
			StringBuffer sb = new StringBuffer();
			sb.append("{" + "\"Suggest_ID\":\"" + Suggest_ID 
					+ "\",\"User_ID\":\"" + User_ID
					+ "\",\"Suggest_Content\":\"" + Suggest_Content
					+ "\",\"Suggest_Reply\":\"" + Suggest_Reply
					+ "\",\"Reply_Email\":\"" + Reply_Email
					+ "\",\"Operator_ID\":\"" + Operator_ID
					+ "\",\"Suggest_Type\":\"" + Suggest_Type + "\","); 
			 
			sb.append("}");
			
//			 System.out.println("9>>发布>>>>" + PublishInfo("AccessCode",
//			 "infojson"));
			
		} catch (Exception e) {
			System.out.println("9>>发布异常信息>>>>" + e.getMessage());
		}
	
		
	}

	private static void testGetChannel() {
		try {// 测试通过
			 System.out.println("8>>频道>>>>" + GetChannel(""));
		} catch (Exception e) {
			System.out.println("8>>频道获取异常信息>>>>" + e.getMessage());
		} 
	}

	private static void testGetAreaCode() {
		try {// 测试通过
			 System.out.println("7>>地域>>>>" + GetAreaCode(""));
		} catch (Exception e) {
			System.out.println("7>>地域接口异常信息>>>>" + e.getMessage());
		}
	
		
	}

	private static void testChangePasswd() {
		try {
//			 System.out.println("6>>用户密码修改>>>>" +  changePasswd(tempCode, "123456",  "321"));
		} catch (Exception e) {
			System.out.println("6>>用户密码修改异常信息>>>>" + e.getMessage());
		}

		
	}

	private static void testChangeUserInfo() {
		try {
			// 用户信息修改界面，请确认需要修改的内容！
			// System.out.println("5>>用户信息修改>>>>" + ChangeUserInfo("AccessCode",
			// "NewUserInfoJsonStr"));
		} catch (Exception e) {
			System.out.println("5>>用户信息修改异常信息>>>>" + e.getMessage());
		}

		
	}

	private static void testUserRegister() {

		try {
			// 注册界面 只有用户名、 密码、手机号需要提交组织为json
			String userName = "test03";
			String password = "123456";
			String telNum = "15812345678";
			StringBuffer sb = new StringBuffer();
			sb.append("{" + "\"Login_Name\":\"" + userName 
					+ "\",\"Login_Password\":\"" + password
					+ "\",\"Telephone_Mobile\":\"" + telNum + "\",");
			

			String str = "\"Password_Question\":\"1+1=?\","
					+ "\"Password_Answer\":\"2\"," + "\"Area_Code\":\"11\","
					+ "\"Regsiter_Type\":\"2\"," + "\"Regster_Source\":\"1\","
					+ "\"Regster_IP\":\"192.168.1.1\","
					+ "\"Register_Date\":\"#\"," + "\"DeadLine_Date\":\"\","
					+ "\"User_Status\":\"3\"," + "\"User_Type\":\"2\","
					+ "\"User_Name\":\"集团\"," + "\"User_Sex\":\"1\","
					+ "\"User_Post\":\"boss\","					 
					+ " \"Telephone_Fixed\":\"18253576797\","
					+ "\"User_Email\":\"250380149@qq.com\","
					+ "\"User_QQ\":\"250380149\","
					+ " \"User_Hobbies\":\"篮球\","
					+ "\"User_Fax\":\"250380149\"," + "\"User_Picture\":\"#\","
					+ "\"User_Address\":\"#\"," + "\"User_Memo\":\"#\","
					+ "\"Company_Name\":\"公司名字\", "
					+ "\"Company_Web\":\"www.baidu.com\", "
					+ "\"Credit_Level\":\"#\"," + "\"Total_Login\":\"#\","
					+ "\"Total_Publish\":\"#\"," + "\"Total_Amount\":\"#\","
					+ "\"Operator_ID\":\"#\"";
			sb.append(str);
			
			sb.append("}");

//			 System.out.println("注册传参json数据>>" +"\n"+ sb.toString());
//			 System.out.println("4>>注册>>>>" + UserRegister(sb.toString()));
		} catch (Exception e) {
			System.out.println("4>>注册异常信息>>>>" + e.getMessage());
		} 
	}

	private static void testLogout() {

		try {
//			 System.out.println("3>>注销>>>>" +"/n"+ Logout(tempCode));
		} catch (Exception e) {
			System.out.println("3>>注销异常信息>>>>" + e.getMessage());
		}

		
	}

	private static void testLogin() {	try {
		 System.out.println("2>>登录>>>>" +"\n"+ login("2", "123"));

	} catch (Exception e) {
		System.out.println("2>>登录异常信息>>>>" + e.getMessage());
	}
}

	private static void test1() { 
		try {// 测试通过
			 System.out.println("1>>配置文件>>>>" +"\n"+ getConfig());
		} catch (Exception e) {
			System.out.println("配置文件异常信息>>>>" + "/n" + e.getMessage());
		} 
	}

	// 获取配置文件
	public static String getConfig() throws Exception {
		String methodName = "GetConfig";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		// 生成调用web service方法的soap请求消息
		 envelope.bodyOut = request;  
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		System.out.println("1>>配置文件1>>>>" + "\n" +"here>>>>>");
		androidHttpTransport.call(soapAction, envelope);
		 
//		Object result = (Object) envelope.getResponse();
//		return result.toString();
	    SoapObject object = (SoapObject) envelope.bodyIn;  
        // 获取返回的结果  
        String result = object.getProperty(0).toString();  
    	return result;
		
	}

	// 用户登录
	public static String login(String userName, String password)
			throws Exception {
		String methodName = "login";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("username", userName);
		request.addProperty("password", password);
//		request.addProperty("ip", ip);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		System.out.println("1>>登陆1>>>>" + "\n" +"here>>>>>");
		 envelope.bodyOut = request;  
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		
		  SoapObject object = (SoapObject) envelope.bodyIn;  
	        // 获取返回的结果  
	        String result = object.getProperty(0).toString();  
	        System.out.println(result);
//		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	// 用户注销
	public static String Logout(String AccessKey) throws Exception {
		String methodName = "Logout";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessKey);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	// 用户注册
	public static String UserRegister(String T_Users) throws Exception {
		String methodName = "UserRegister";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("T_Users", T_Users);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	// 5>>用户信息修改
	public static String ChangeUserInfo(String AccessCode, String NewUserInfo)
			throws Exception {
		String methodName = "ChangeUserInfo";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		request.addProperty("NewUserInfo", NewUserInfo);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	// 用户密码修改
	public static String changePasswd(String AccessCode, String Oldpassword,
			String password) throws Exception {
		String methodName = "changePasswd";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		request.addProperty("Oldpassword", Oldpassword);
		request.addProperty("Newpassword", password);

		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	/**
	 * 7>>地域接口
	 * 
	 * @param GetAreaCode
	 * @return
	 * @throws Exception
	 */
	public static String GetAreaCode(String AccessCode) throws Exception {
		String methodName = "GetAreaCode";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	/**
	 * 8>>频道接口
	 * 
	 * @param AccessCode
	 * @return
	 * @throws Exception
	 */
	public static String GetChannel(String AccessCode) throws Exception {
		String methodName = "GetChannel";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	// 9>>发布接口
	public static String PublishInfo(String AccessCode, String info)
			throws Exception {
		String methodName = "PublishInfo";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		request.addProperty("info", info);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	/**
	 * 
	 * 10>>即时查询接口
	 * 
	 * @param AccessCode
	 *            用户访问码
	 * @param startTime
	 *            起始日期
	 * @param endTime
	 *            结束时间
	 * @param InfoID
	 *            起始消息ID
	 * @param pagesize
	 *            取条数
	 * @param where
	 *            查询条件
	 * @return
	 * @throws Exception
	 */
	public static String GetInfoList(String AccessCode, String startTime,
			String endTime, int InfoID, int pagesize, String where)
			throws Exception {
		String methodName = "GetInfoList";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		request.addProperty("startTime", startTime);
		request.addProperty("endTime", endTime);
		request.addProperty("InfoID", InfoID);
		request.addProperty("InfoID", InfoID);
		request.addProperty("pagesize", pagesize);
		request.addProperty("where", where);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	/**
	 * 11>>历史查询接口
	 * 
	 * @param AccessCode
	 *            用户访问码
	 * @param startTime
	 *            起始日期
	 * @param endTime
	 *            结束时间
	 * @param InfoID
	 *            起始消息ID
	 * @param pagesize
	 *            取条数
	 * @param where
	 *            查询条件
	 * @return
	 * @throws Exception
	 */
	public static String GetInfoHistoryList(String AccessCode,
			String startTime, String endTime, int InfoID, int pagesize,
			String where) throws Exception {
		String methodName = "GetInfoHistoryList";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		request.addProperty("startTime", startTime);
		request.addProperty("endTime", endTime);
		request.addProperty("InfoID", InfoID);
		request.addProperty("pagesize", pagesize);
		request.addProperty("where", where);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	/**
	 * 12>>提交用户接口
	 * 
	 * @param AccessCode
	 * @param InforID
	 * @return
	 * @throws Exception
	 */

	public static String SubmitUsers(String AccessCode, String InforID)
			throws Exception {
		String methodName = "SubmitUsers";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		request.addProperty("InforID", InforID);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	/**
	 * 13>>焦点信息接口
	 * 
	 * @param InforID
	 * @return
	 * @throws Exception
	 */

	public static String GetInfoFocusList(String InforID) throws Exception {
		String methodName = "GetInfoFocusList";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("InforID", InforID);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	/**
	 * 14>>提交建议接口
	 * 
	 * @param AccessCode
	 * @param InforID
	 * @return
	 * @throws Exception
	 */

	public static String SubmitSuggest(String AccessCode, String suggest)
			throws Exception {
		String methodName = "SubmitSuggest";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		request.addProperty("suggest", suggest);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	/**
	 * 15>>获取产品接口
	 * 
	 * @param AccessCode
	 * @param channeled
	 * @return
	 * @throws Exception
	 */

	public static String getProductlist(String AccessCode, String channelid)
			throws Exception {
		String methodName = "getProductlist";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		request.addProperty("ChannelId", channelid);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	/**
	 * 16>>产品订购接口
	 * 
	 * @param AccessCode
	 * @return
	 * @throws Exception
	 */

	public static String GetSubscriptionList(String AccessCode)
			throws Exception {
		String methodName = "GetSubscriptionList";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	/**
	 * 17>>通知接口
	 * 
	 * @param AccessCode
	 * @param PublishDate
	 * @return
	 * @throws Exception
	 */

	public static String GetNoticeList(String AccessCode, String PublishDate)
			throws Exception {
		String methodName = "GetNoticeList";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		request.addProperty("PublishDate", PublishDate);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	/**
	 * 18>>新闻类型接口
	 * 
	 * @param AccessCode
	 * @param InforID
	 * @return
	 * @throws Exception
	 */

	public static String GetNewsType(String AccessCode) throws Exception {
		String methodName = "GetNewsType";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}

	/**
	 * 
	 * 19>>新闻信息接口
	 * 
	 * @param AccessCode
	 *            用户访问码
	 * @param startTime
	 *            起始日期
	 * @param endTime
	 *            结束时间
	 * @param InfoID
	 *            起始消息ID
	 * @param pagesize
	 *            取条数
	 * @param where
	 *            查询条件
	 * @return
	 * @throws Exception
	 */

	public static String GetNewsList(String AccessCode, String startTime,
			String endTime, int InfoID, int pagesize, String where)
			throws Exception {
		String methodName = "GetNewsList";// 方法名
		String soapAction = nameSpace + methodName;// 命名空间/方法名
		// 创建SoapObject实例
		SoapObject request = new SoapObject(nameSpace, methodName);
		request.addProperty("AccessCode", AccessCode);
		request.addProperty("startTime", startTime);
		request.addProperty("endTime", endTime);
		request.addProperty("InfoID", InfoID);
		request.addProperty("InfoID", InfoID);
		request.addProperty("pagesize", pagesize);
		request.addProperty("where", where);
		// 生成调用web service方法的soap请求消息
		SoapSerializationEnvelope envelope = new SoapSerializationEnvelope( SoapEnvelope.VER10);
		envelope.dotNet = true; // 设置.net web service
		envelope.setOutputSoapObject(request);// 发送请求
		HttpTransportSE androidHttpTransport = new HttpTransportSE(SERVER_URL);
		androidHttpTransport.call(soapAction, envelope);
		Object result = (Object) envelope.getResponse();
		return result.toString();
	}
}